<?php
namespace App\Controllers;

use \ImWorker\ImEqueue;

/**
 * 默认控制器
 */
class ApiController extends BaseController
{
    private $redis;

    protected function init()
    {
        $this->redis = ImEqueue::redis();
    }
    public function getAction()
    {
        $workers = $this->redis->smembers('workers');
        return json_encode($workers);
    }

    public function postAction()
    {
        return var_export($this->request->post, true);
    }
}
